package com.kmshack.topscrollsample;

import com.kmshack.topscroll.TopScrollHelper;
import com.kmshack.topscrollsample.slice.MainAbilitySlice;
import ohos.aafwk.ability.Ability;
import ohos.aafwk.content.Intent;
import ohos.agp.components.Component;
import ohos.agp.components.ScrollView;

public class MainAbility extends Ability {

    @Override
    public void onStart(Intent intent) {
        super.onStart(intent);
//        super.setMainRoute(MainAbilitySlice.class.getName());
        super.setUIContent(ResourceTable.Layout_ability_main);
        ScrollView scrollView= (ScrollView) findComponentById(ResourceTable.Id_scrollview);
        TopScrollHelper.getInstance(this,findComponentById(ResourceTable.Id_top_view)).addTargetScrollView(scrollView);
    }
}
